package com.linln.admin.SpringBoot.repository;


import com.linln.admin.SpringBoot.domain.StuTeam;


import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface StuTeamRepository  extends JpaRepository<StuTeam, Long> {
    @Transactional
    @Modifying
    @Query(value = "DELETE FROM stu_team WHERE stu_id = ?1 AND  team_id = ?2",nativeQuery = true)
    void deleteByStuIdAndTeamId (int stuId,int teamId);
}
